package com.cq.hd.member.controller;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.common.response.Result;
import com.cq.hd.common.response.ResultGenerator;
import com.cq.hd.member.api.TbSubsidyAmtBillApi;
import com.cq.hd.member.api.dto.AdminSubsidyAmtBillPageDto;
import com.cq.hd.member.api.dto.SubsidyAmtBillDto;
import com.cq.hd.member.api.vo.AdminSubsidyAmtBillPageVo;
import com.cq.hd.member.api.vo.SubsidyAmtBillPageVo;
import com.cq.hd.member.service.TbSubsidyAmtBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 补贴金流水表 前端控制器
 * </p>
 *
 * @author mYunYu
 * @since 2024-01-28
 */
@RestController
public class TbSubsidyAmtBillController implements TbSubsidyAmtBillApi {

    @Autowired
    private TbSubsidyAmtBillService subsidyAmtBillService;

    @Override
    public Result<List<SubsidyAmtBillPageVo>> listSubsidyAmtBill(SubsidyAmtBillDto subsidyAmtBillDto) {
        return ResultGenerator.success(subsidyAmtBillService.listSubsidyAmtBill(subsidyAmtBillDto));
    }

    @Override
    public Result<Page<AdminSubsidyAmtBillPageVo>> pageSubsidyAmtBill(AdminSubsidyAmtBillPageDto adminSubsidyAmtBillPageDto) {
        return ResultGenerator.success(subsidyAmtBillService.pageSubsidyAmtBill(adminSubsidyAmtBillPageDto));
    }
}
